// pages/family/family.js
const app=getApp();
Page({
  data: {
    members: []
  },
  addMembers(){
    wx.navigateTo({
      url: '/pages/tianjiaCY/tianjiaCY'
    })
  },
  onLoad: function() {
    let url = app.globalData.URL + '/members/queryListByUserId';
    let data = {
      userId: app.globalData.user.userId
    };
    app.wxRequest('GET', url, data, (res) => {
      console.log(res.data)
      this.setData({
        members:res.data
      })
    }, (err) => {
      console.log(err.errMsg)
    })
  },

  // 方法定义
});
